package com.twu.biblioteca;

import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;

public class Movie {

    private Map<Integer, String> movies = new HashMap<Integer, String>();
    private PrintStream stream;

    public Movie(PrintStream stream) {
        this.stream = stream;
        movies.put(1, "Love & Other Drugs 2010 Edward Zwick 6");
        movies.put(2, "The Dreamers 2003 Bernardo Bertolucci 7");
        movies.put(3, "The Lives of Others 2006 Florian Henckel von Donnersmarck 8");
        movies.put(4, "Cashback 2006 Sean Ellis 7");
        movies.put(5, "Room in Rome 2010 Julio Medem 6");
        movies.put(6, "Bridesmaids 2011 Paul Feig 7");
        movies.put(7, "Enter the Void 2009 Gaspar Noé 7");
        movies.put(8, "Olympus Has Fallen 2013 Antoine Fuqua N/A");
        movies.put(9, "This is 40 2012 Judd Apatow 6");
        movies.put(10, "Identity Thief 2013 Seth Gordon 4");
        movies.put(11, "Gangster Squad 2012 Ruben Fleischer 7");
        movies.put(12, "Sightseers 2012 Ben Wheatley 4");
        movies.put(13, "Welcome to the Punch 2012 Eran Creevy 6");
        movies.put(14, "we are the millers 2013 Rawson Marshall Thurber N/A");
        movies.put(15, "Al Helm: Martin Luther King Jr. in Palestine 2003 Bernardo Bertolucci N/A");
    }

    public void displayMovies() {
        String output = "Movie  Year  Director  Rating \n";
        for (Integer key : movies.keySet()) {
            output += key + "." + movies.get(key) +"\n";
        }
        stream.println(output);
    }


}
